package com.fs.service.bo.purchase;

import com.fs.entity.PurchaseRecord;
import com.fs.service.bo.customer.BoCustomer;
import com.fs.service.bo.room.BoRoom;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
public class BoPurchaseWithRoomAndCustomer extends BoPurchase {
    private BoRoom room;
    private BoCustomer customer;


    public BoPurchaseWithRoomAndCustomer(PurchaseRecord purchaseRecord) {
        super(purchaseRecord);
        try {
            this.room = new BoRoom(purchaseRecord.getRoom());
            this.customer = new BoCustomer(purchaseRecord.getCustomer());

        } catch (Exception ignored) {

        }
    }
}
